package com.dal.gm_api;

import com.dal.gm_api.api.IAccount;
import com.dal.gm_api.api.IGameIntercept;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        HttpRemote remote = new HttpRemote("http://120.131.3.158:7071");
        IAccount server = remote.create(IAccount.class);
//        List<String> lists = new ArrayList<>();
//        lists.add("42553642");
//        System.out.println(server.getAccountInfos(lists, 2));
//        Map map = new HashMap<>();
        
//        List uids = new ArrayList<>();
//        uids.add("dd2a26ea77dd4888a5968fd06296f321");
//        System.out.println(server.operateAccount(OperateAccountType.INTERCEPT_TYPE_ACCOUNT_ID, uids, new HashMap<>()));
        IGameIntercept intercept = remote.create(IGameIntercept.class);
        intercept.removeIntercept(4);
        System.out.println(intercept.getInterceptInfo());
        
//        List<String> targets = new ArrayList<String>();
//        targets.add("35d71dd7458e4cc48832d7dd0669b389");
//        server.intercept(2, targets, new Date(), "测试封号");
        
//        IMail server = remote.create(IMail.class);
//        List<Integer> targets = new ArrayList<>();
//        targets.add(10000072);
//        server.sendMail(1, "gm.mail.title", "gm.mail.content", new HashMap<>(), new HashMap<>(), targets);
        
//        List<String> lists = server.queryMail(10000072, new Date(System.currentTimeMillis()-(60 * 1000 * 60)), new Date(System.currentTimeMillis()+(24 * 60 * 1000 * 60)));
//        List<String> lists = server.queryMail(10000072, new Date(System.currentTimeMillis()-(60 * 1000 * 60)), new Date(System.currentTimeMillis()+(60 * 1000 * 60)));
//        System.out.println(lists);
        
//        INotice server = remote.create(INotice.class);
//        int channel = 1;//渠道id
//        int channelAppId = 1;//渠道appId
//        int type = 1;//1-活动公告  2-游戏公告
//        Date startTime = new Date(System.currentTimeMillis()-(60 * 1000 * 60));//开始时间
//        Date endTime = new Date(System.currentTimeMillis()+(60 * 1000 * 60));//结束时间
//        int tag = 2;//标签（0-无 1-hot 2-new 3-限时）
//        int index = 1;//顺序
//        String content = "测试公告内容1";//正文
//        String param = "{\"x\":1,\"y\":2}";//附加参数
//        String title = "测试公告标题1";//标题
//        String contextImg = "";//图片        
//        server.addNotice(channel, channelAppId, content,param, startTime, endTime, index, type, tag, title, contextImg);
//        
//        //查询公告
//        List<String> lists = server.queryNotice(false);
        
//        System.out.println(lists);
        
//        // 删除公告
//        List<Integer> idList = new ArrayList<Integer>();
//        idList.add(1);
//        server.deleteNotice(idList);
    }
}
